home *** CD-ROM | disk | FTP | other *** search
/ Trading on the Edge / Trading On The Edge - CD-ROM Toolkit (Wayzata Technology)(2031)(1994).bin / pc / mac_file / vendor_d / neuralwa / nw2v50 / percptrn.inh < prev    next >
Text File  |  1993-08-23  |  3KB  |  123 lines

  1. inst4.1
  2. !****************************************************************
  3. !*                                *
  4. !*    Perceptron Network Generator                *
  5. !*                                *
  6. !****************************************************************
  7.  
  8. !    *** check that input / output PE count is non-zero
  9.  
  10. ?&In    1
  11. >bge    CheckOut
  12. @Err    "Perceptron MUST have at least one input PE"
  13. :CheckOut
  14. ?&Out    1
  15. >bge    OutOK
  16. @Err    "Perceptron MUST have at least one output PE"
  17. :OutOK
  18.  
  19. !    *** Load the Control Strategy and LRS if needed
  20.  
  21. @LdCS    "percptrn"        !control strategy
  22. @LdLR    "percptrn"        !L/R schedule
  23.  
  24. =netn    "InstaNet (tm) Perceptron Network version 1.00 20-Jun-88"
  25. =DLnF    0            !learn  re-display off
  26. =DRcF    0            !recall re-display off
  27.  
  28. !    *** Build the Input Layer ***
  29.  
  30. @LLdf                !load default layer to mi_layer structure
  31. =LDln    "In"            !layer name
  32. =Lpes    &In            !copy # of input PEs from menu
  33. =Ltrn    "Perceptron"        !transfer function
  34. =x    100            !place to put layer on screen
  35. =y     80
  36. #Incl    "stdnwgtf.iif"        !standard # weight fields
  37. @LAdd                !add the input layer
  38. =n0    LayN            !track previous layer
  39. =cnsc    WAbs            !absolute
  40. =cnwt    1.0            !connection weight
  41.  
  42. !    *** Build the Feature Demon Layer ***
  43.  
  44. ?&Hd1    0            !any hidden layer?
  45. >ble    NoDmn            !no demons
  46. @LLdf                !start with default layer again
  47. =LDln    "Demon"            !layer name
  48. =Lpes    &Hd1            !desired number of PEs
  49. =Ltrn    "Perceptron"        !transfer function
  50. +y    80            !up higher on display
  51. #Incl    "stdnwgtf.iif"        !standard # weight fields
  52. @LAdd
  53.  
  54. !    *** Connect Adaline Layer to Bias & Input Layers ***
  55.  
  56. =SPEl    LayN            !current layer
  57. @SlPE                !select it as destination (sb already)
  58. =NPEl    -1            !near to bias term (source)
  59. @NrPE
  60. =cnty    WVar            !variable connections
  61. @LCFl
  62. =cndn    0.5            !50 % connections
  63. =NPEl    n0            !input layer
  64. @NrPE
  65. @LCRn
  66. =NPEl    LayN            !randomize these weights
  67. @NrPE
  68. =jogl    -1.0            !randomize range
  69. =jogh     1.0
  70. @Lrnd                !randomize them
  71. =NPEl    n0            !fix the weights between these layers
  72. @NrPE
  73. =cnty    WFix
  74. @LCty                !connection type
  75. =NPEl    -1            !bias layer
  76. @NrPE
  77. @LCty
  78. =n0    LayN            !track previous layer
  79. :NoDmn
  80.  
  81. !    *** Build the output layer & connect it to prior layer ***
  82.  
  83. @LLdf                !load default layer to mi_layer structure
  84. =LDln    "Out"            !layer name
  85. =Lpes    &Out            !copy # of input PEs from menu
  86. =Ltrn    "Perceptron"        !transfer function
  87. =Llrn    "Perceptron"        !learning rule
  88. +y    80
  89. #Incl    "stdnwgtf.iif"        !standard # weight fields
  90. @LAdd                !add the output layer
  91. =SPEl    LayN            !output layer
  92. @SlPE
  93. =NPEl    n0            !previous layer
  94. @NrPE
  95. =cnty    WVar
  96. @LCFl
  97. =NPEl    -1            !bias layer
  98. @NrPE
  99. @LCFl
  100.  
  101. !    *** Select Control Strategy & L/R Schedule ***
  102.  
  103. @LLsl                !load super layer
  104. =Lctl    "percptrn"        !control strategy
  105. =Llrs    "percptrn"        !L/R Schedule
  106. =Llnn    "percptrn"        !name of learn input
  107. =Lrcn    "percptrn"        !name of recall output
  108. #Incl    "stdioset.iif"        !standard I/O settings
  109. =Lscl    -1            !input  low-value
  110. =Loff     1            !input  high-value
  111. =Llow     0            !output low-value
  112. =Lhgh     1            !output high-value
  113. =Lax1    Epch            !epoch size
  114. @SVsl                !save it back
  115. !
  116. =jogl    -.1            !lower limit for jog
  117. =jogh    +.1            !upper limit for jog
  118. =seed    257            !starting seed number
  119. @seed                !set the seed
  120. @Nrnd                !randomize the network
  121.  
  122. @EOF
  123.